<?
$url	= getURL(1,1,1,1);
$db_header_menu	= new db_query("SELECT mnu_name, mnu_link, mnu_defined
											 FROM menus
											 WHERE mnu_type = 1 AND mnu_parent_id = 0 AND mnu_active = 1 AND lang_id = " . $lang_id . "
											 ORDER BY mnu_order ASC");
if(mysql_num_rows($db_header_menu->result) > 0){
	?>
	<div class="menu">
		<ul>
		<?
		while($row = mysql_fetch_assoc($db_header_menu->result)){
			$class	= (@preg_match($row["mnu_defined"], $url) == 0 ? "" : "current");
			?>
			<li class="<?=$class?>"><a href="<?=$row["mnu_link"]?>"><?=$row["mnu_name"]?></a></li>
			<?
		}
		?>
         <li>
				<a href="/cart.php" class="menu_cart" title="Giỏ hàng">
            <?
				if(isset($_SESSION['Cart'])){
    				echo count($_SESSION['Cart']);
            }
				else{
               echo "0";
            }
            ?>
				</a>
			</li>
		</ul>
	</div>
	<?
}
$db_header_menu->close();
unset($db_header_menu);
?>